<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * BackendPro
 *
 * A website backend system for developers for PHP 4.3.2 or newer
 *
 * @package         conlabz CMS
 * @author          Christian Schneider
 * @copyright       Copyright (c) 2009
 * @license        
 * @link            http://www.conlabz.de
 * @filesource
 */

// ---------------------------------------------------------------------------

/**
 * Domain
 *
 * Allows to manage domain informations
 *
 * @package         conlabz CMS
 * @subpackage      Controllers
 */
class Domain extends Admin_Controller {
	
	function Domain( ) {
		parent::Admin_Controller( );
		
		$this->load->helper( 'form' );

		// Check for access permission
		// needs to be defined as a resource over the admin area
		check( 'Domain' );

		// Load the validation library
		$this->load->library( 'validation' );

		// Load the domain model
		$this->load->model( 'domain_model' );
		
		// Load the language files
		$this->lang->module_load( 'article', 'website' );
		$this->lang->module_load( 'article', 'classification' );
		$this->lang->module_load( 'article', 'domain' );
		$this->lang->module_load( 'article', 'language' );
		$this->lang->module_load( 'article', 'portlets' );

		// Set breadcrumb
		$this->bep_site->set_crumb( $this->lang->line( 'domain' ), 'article/admin/domain' );
				
		log_message( 'debug', 'conlabz CMS : Domain class loaded' );
	}	
	
	/**
	 * View Domains
	 *
	 * @access public
	 */
	function index( ) {
		// Get Domain Infomation
		$data['domains'] = array( );
		$data['domains'] = $this->domain_model->getDomains( );
		
		// Display Page
		$data['header'] = $this->lang->line( 'domain_overview' );
		$data['page'] = $this->config->item('backendpro_template_admin') . "/view_domains";
		$data['module'] = 'article';
		$this->load->view( $this->_container, $data );
	}
	
	/**
	 * Delete Domain
	 *
	 * @access public
	 */
	function delete( ) {
		
	}
}
/* End of file domain.php */
/* Location: ./modules/article/controllers/admin/domain.php */